package controllers;

import java.util.List;

import models.Resume;
import play.mvc.Controller;


public class Manage extends Controller{
	
	public final static String FORWARD="forward"; 
	public final static String BACKSTAGE="backstage"; 
	public final static String WEBMASTER="webmaster"; 
	public final static String UI="ui"; 
	public final static String WECHAT="wechat"; 
	public final static String PUB="pub"; 
	
	
	public static void checkMessage(int type){
		List<Resume> resumes=null;
		
		switch(type){
			case 0:resumes=Resume.findAll();break;
			case 1:resumes=Resume.find("position = ?", FORWARD).fetch();break;
			case 2:resumes=Resume.find("position = ?", BACKSTAGE).fetch();break;
			case 3:resumes=Resume.find("position = ?", WEBMASTER).fetch();break;
			case 4:resumes=Resume.find("position = ?", UI).fetch();break;
			case 5:resumes=Resume.find("position = ?", WECHAT).fetch();break;
			case 6:resumes=Resume.find("position = ?", PUB).fetch();break;
			default:break;
		}
		
		
		
		
		
		render(resumes);
	}
}
